Add Method (AddressEntries Collection) 

The Add method creates and returns a new AddressEntry1O6Y3BK object in the AddressEntries collection.

Syntax

Set objAddressEntry = objAddrEntriesColl.Add(emailtype [, name, address ] )

Parameters

objAddressEntry

On successful return, contains the new AddressEntry object.

objAddrEntriesColl

Required. The AddressEntries collection object.

emailtype

Required. String. The address type of the address entry.

name

Optional. String. The display name or alias of the address entry.

address

Optional. String. The full messaging address of the address entry.

 

Remarks

The emailtype parameter corresponds to the PR_ADDRTYPE property and qualifies the address parameter by specifying which messaging system the address is valid in. Typical values are SMTP, FAX, and X400.

The name and address parameters correspond to the NameLT9V1S and AddressLTH4O5 properties of the AddressEntry object.

The user must have permission to Add or Delete0O9HA4 an AddressEntry object. Most users have this permission only for their personal address list (PAL).

The new AddressEntry1O6Y3BK object is saved in the MAPI system when you call its UpdateJJLC0D method.

Example

This code fragment adds a new entry to a user s personal address list (PAL):

' get AddressEntries collection of PAL AddressList

Set myList = MAPI.Session.AddressLists( Personal Address List )

' add new AddressEntry to AddressEntries collection

Set newEntry = myList.Add  FAX ,  John Doe 

' add FaxNumber field to new AddressEntry and give it a value

newEntry.Fields.Add  FaxNumber , vbString

newEntry.Fields( FaxNumber ) =  +1-206-555-7069 

' commit new entry, field, and value to PAL AddressList

newEntry.Update